<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../../css/common.css" />
		<link rel="stylesheet" type="text/css" href="../../css/order/paymentSuccess.css" />
	</head>

	<body>
		<div id="paymentSuccess">
			<header class="mui-bar mui-bar-nav">
				<h1 class="mui-title">支付成功</h1>
				<a class="mui-action-back mui-icon mui-pull-right">完成</a>
			</header>
			<div class="main">
				<div class="success_img"><img src="../../images/checked.png" /></div>
				<div class="success_text">订单支付成功</div>
				<div class="uccess_data">
					<div>
						<div>支付方式：</div>
						<div>支付金额：</div>
					</div>
					<div>
						<div class="mode"></div>
						<div>￥<span class="money"></span></div>
					</div>
				</div>
				<div class="uccess_tap">
					<button type="button" class="mui-btn" id="seeorder">查看订单</button>
					<button type="button" class="mui-btn" id="gohome">返回首页</button>
				</div>
			</div>
		</div>
		<script src="../../js/mui.min.js"></script>
		<script src="../../js/libs/zepto.js"></script>
		<script src="../../js/common.js"></script>
		<script type="text/javascript">
			mui.init({
				swipeBack:true
			})
			mui.plusReady(function() {
				if(plus.webview.getWebviewById('orderdetails.html')) {
					plus.webview.getWebviewById('orderdetails.html').close('none')
				}
				var list = plus.webview.getWebviewById('../my/order.html')
				mui.fire(list, 'order');

				if(plus.webview.getWebviewById('../order/ordersubmit.html')) {
					var list = plus.webview.getWebviewById('../order/ordersubmit.html')
					mui.fire(list, 'order');
				}

				var self = plus.webview.currentWebview();
				if(self.parameter.val == 'wxpay') {
					$(".mode").text('微信支付')
				} else if(self.parameter.val == 'alipay') {
					$(".mode").text('支付宝支付')
				} else if(self.parameter.val == 'balance') {
					$(".mode").text('余额支付')
				} else if(self.parameter.val == 'gold') {
					$(".mode").text('金币支付')
				} else {
					$(".mode").text('混合支付')
				}
				$(".money").text(self.parameter.money)

				$("#gohome").on("tap", function() {
					var list = plus.webview.getWebviewById("ylindex.html")
					mui.fire(list, 'gohome');
					var wvs, self, launch;
					wvs = plus.webview.all();
					self = plus.webview.currentWebview();
					launch = plus.webview.getLaunchWebview();
					for(var i = 0, len = wvs.length; i < len; i++) {
						if(wvs[i].getURL() == launch.getURL() || wvs[i].id == 'ylindex.html' || wvs[i].id == 'home.html' || wvs[i].id == 'classify.html' || wvs[i].id == 'special.html' || wvs[i].id == 'shopping.html' || wvs[i].id == 'my.html' || wvs[i].id == '../special/specialregion.html') {
							continue;
						}
						wvs[i].close();
					}
				})
				$("#seeorder").on('tap', function() {
					if(plus.webview.getWebviewById('../order/ordersubmit.html')) {
						mui.back()
					} else {
						common.open('ordersubmit.html', '../order/ordersubmit.html', self.parameter.id)
					}
				})
			})
		</script>
	</body>

</html>